# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=py3-tomlkit
_realname=tomlkit
pkgver=0.13.2
pkgrel=0
pkgdesc="Style-preserving TOML library for Python"
url="https://github.com/sdispater/tomlkit"
arch="noarch"
license="MIT"
makedepends="py3-gpep517 py3-installer py3-poetry-core"
checkdepends="py3-pytest py3-yaml"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/${_realname:0:1}/$_realname/$_realname-$pkgver.tar.gz"
builddir="$srcdir/$_realname-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/tomlkit-$pkgver-py3-none-any.whl
}

sha512sums="
65b45468de25a6b9f22c3fe3468301902e1e439de580e74f15f5a24985546a4bfe47642b6014a25590eb176fedbe468828d7bc84c9c3b65ab418c071f0902957  tomlkit-0.13.2.tar.gz
"
